
//
// 120825 - AH - Created.
//

package org.soekrat.server.serialization;

import java.io.Serializable;

/**
 * <p>
 *   Describes a ratbase.
 * </p>
 * @author Arne Halvorsen (AH)
 * @author Laetitia Le Chatton (LLC)
 */
public final class RatbaseSerializable implements Serializable
{
  private static final long serialVersionUID=-2783937928586673979L;

  private final long id;
  
  private final String name;
  
  /**
   * <p>
   *   Constructor.
   * </p>
   * @param id   Key of base.
   * @param name Name of base.
   */
  public RatbaseSerializable(long id, String name)
  { 
    this.id=id; 
    this.name=name; 
  }
  
  /**
   * <p>
   *   Gets id of rat base.
   * </p>
   * @return Owner's id or {@code null} if not sat. 
   */
  public long id(){ return this.id; }
 
  /**
   * <p>
   *   Gets name of rat base.
   * </p>
   * @return
   */
  public String name(){ return this.name; }
  
  @Override
  public String toString() 
  {
    StringBuilder sb=new StringBuilder();
    sb.append("id=").append(id).append(", name=").append(name);
    return sb.toString();
  }
  
  /**
   * <p>
   *   The empty array shared.
   * </p>
   */
  public static final RatbaseSerializable[] EMPTY_ARRAY=
    new RatbaseSerializable[0];
  
}
